<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <button data-toggle-id="email">邮箱</button>
    <input type="text" id="email" />
    <hr />
    <p data-toggle-id="abc">hello</p>
    <div id="abc">hell jack</div>
    <script>
      document.onclick = function (e) {
        const toggleId = e.target.dataset.toggleId;
        const el = document.getElementById(toggleId);
        if (el !== null) {
          el.hidden = !el.hidden;
        }
      };
    </script>
  </body>
</html>
